package com.heima.string.string;

public class StringDemo06 {
    public static void main(String[] args) {
        /**
         * 手机号屏蔽
         * String substring(int beginIndex, int endIndex) 截取
         * 注意点: 区间是左闭右开 [)
         * String substring(int beginIndex) 截取到末尾
         */
        String phone = "13112349468";
        String newPhone = phone.substring(0, 3)+"****"+phone.substring(7);
        System.out.println(newPhone); // 131****9468
    }
}
